﻿using System.Security.Cryptography;

namespace QLKDS.Helper
{
    public class EncryptionPassword
    {     
        public static string GetMD5(string password)
            {
                string str_md5 = "";
                byte[] mang = System.Text.Encoding.UTF8.GetBytes(password);

                MD5CryptoServiceProvider my_md5 = new MD5CryptoServiceProvider();
                mang = my_md5.ComputeHash(mang);
            
                foreach (byte b in mang)
                {
                    str_md5 += b.ToString("X2");
                }
        
                return str_md5;
            }
    }
}
